<?xml version="1.0"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <SnippetTypes>
        <SnippetType>Expansion</SnippetType>
      </SnippetTypes>
      <Title>Define a Csla ReadWrite Property Private Backing Field</Title>
      <Author>Rockford Lhotka</Author>
      <Description>Define a Csla ReadWrite property with private backing field.</Description>
      <HelpUrl>
      </HelpUrl>
      <Shortcut>cslapropp</Shortcut>
    </Header>
    <Snippet>
      <Declarations>
        <Literal Editable="true">
          <ID>PropertyName</ID>
          <ToolTip>Replace with property name.</ToolTip>
          <Default>Name</Default>
          <Function>
          </Function>
        </Literal>
        <Literal Editable="true">
          <ID>FriendlyName</ID>
          <ToolTip>Replace with friendly property name.</ToolTip>
          <Default>Name</Default>
          <Function>
          </Function>
        </Literal>
        <Literal Editable="true">
          <ID>PropertyType</ID>
          <ToolTip>Replace with the property type.</ToolTip>
          <Default>String</Default>
          <Function>
          </Function>
        </Literal>
        <Literal Editable="true">
          <ID>PrivateFieldName</ID>
          <ToolTip>Replace with private field name.</ToolTip>
          <Default>_name</Default>
          <Function>
          </Function>
        </Literal>
      </Declarations>
      <Code Language="vb" Kind="method decl"><![CDATA[Public Shared ReadOnly $PropertyName$Property As PropertyInfo(Of $PropertyType$) = RegisterProperty(Of $PropertyType$)(Function(c) c.$PropertyName$, RelationshipTypes.PrivateField)
'<NotUndoable, NonSerialized> _
Private $PrivateField$Name As $PropertyType$ = $PropertyName$Property.DefaultValue
Public Property $PropertyName$() As $PropertyType$
	Get
		Return GetProperty($PropertyName$Property, $PrivateFieldName$)
	End Get
	Set(ByVal value as $PropertyType$)
		SetProperty($PropertyName$Property, $PrivateFieldName$, value)
	End Set
End Property$end$
]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>